package com.test.test.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicUpdate;

import lombok.Data;

@Entity
@Table(name = "t_user")
@DynamicUpdate // 动态更新时间 对应数据库列 自动更新时间的列
@Data // 定义这个不用写get、set、tostring 方法
public class User implements Serializable {

	/** serialVersionUID. */
	private static final long serialVersionUID = 1L;

	public User() {
		// TODO Auto-generated constructor stub
	}

	// 快速简历帯参数的构造方法 alt + shift +s 选择Generate Constructor Using fields
	public User(Integer id, String userName, String mobile) {
		super();
		this.id = id;
		this.userName = userName;
		this.mobile = mobile;
	}

	/** 主键. */
	@Id
	@GeneratedValue
	private Integer id;

	/** 用户名. */
	private String userName = "";

	/** 手机号码. */
	private String mobile = "";

	/** 邮箱. */
	private String email = "";

	/** 密码. */
	private String password = "";

	/** 用户类型. */
	private Integer userType = 0;

	/** 注册时间. */
	private Date registerTime = new Date();

	/** 所在区域. */
	private String region = "";

	/** 是否有效 0 有效 1 无效. */
	private Integer validity = 0;

	/** 头像. */
	private String headPortrait = "";

}
